#include "StdAfx.h"
#include "Word.h"


Word::Word(void)
{
}


Word::~Word(void)
{
}

BOOL Word::LoadPronounce()
{
	int i ;
	ULONG n;
	std::string str = "";
	HRESULT hr;
	CComPtr<ISpObjectToken> token;
	CComPtr<ISpVoice> tts;
	CoInitialize(0);

	tts.CoCreateInstance(CLSID_SpVoice);
	hr = SpGetDefaultTokenFromCategoryId(SPCAT_VOICES,&token,FALSE);
	hr = tts->SetVoice(token);
	tts->Speak(name,SPF_IS_XML | SPF_ASYNC,&n);
	tts->WaitUntilDone(-1);

	tts.Release();
	token.Release();
	CoUninitialize();
	
	return TRUE;
}